package com.hexb.smh.entity.view;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hexb.smh.entity.enums.OperationResult;
import com.hexb.smh.entity.enums.RoleType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author : hexb
 */
@Data
public class OperationLogView {

    @ApiModelProperty("id")
    private Integer id;

    @ApiModelProperty("操作名称")
    private String operationName;

    @ApiModelProperty("操作帐号Id")
    private Integer accountId;

    @ApiModelProperty("结果")
    private OperationResult result;

    @ApiModelProperty("如果失败,错误信息")
    private String message;

    @ApiModelProperty("操作详情")
    private String detail;

    @ApiModelProperty("操作时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date createTime;

    @ApiModelProperty("操作人姓名")
    private String accountName;

    @ApiModelProperty("操作人登录名")
    private String loginName;

    @ApiModelProperty("操作人手机号")
    private String phoneNo;

    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("角色")
    private RoleType role;

}
